import java.io.PrintWriter;
import java.util.Scanner;

public class ATSolution {

	Scanner in;

	PrintWriter out;

	int pow[];

	int ans[];

	static class AnswerFound extends Exception {
	}

	void gen(int pos, int sum, int taken) throws AnswerFound {
		if (pos == pow.length) {
			return;
		}
		if (sum == taken) {
			for (int i = pos - 1; i >= 0; i--) {
				out.print(ans[i]);
			}
			out.println();
			throw new AnswerFound();
		}
		ans[pos] = 1;
		gen(pos + 1, sum + pow[pos], taken);
		ans[pos] = 0;
		gen(pos + 1, sum, taken);
	}

	void solve() {
		int n = in.nextInt();
		pow = new int[22];
		ans = new int[22];
		pow[0] = 1;
		for (int i = 1; i < pow.length; i++) {
			pow[i] = pow[i - 1] * -2;
		}
		try {
			gen(0, 0, n);
			out.println("G");
		} catch (AnswerFound e) {
		}
	}

	void run() {
		in = new Scanner(System.in);
		out = new PrintWriter(System.out);
		try {
			solve();
		} finally {
			out.close();
		}
	}

	public static void main(String[] args) {
		new ATSolution().run();
	}
}
